import pyraysum

# 创建场景对象
scene = pyraysum.Scene()

# 添加一个球体和一个平面
sphere = pyraysum.Sphere(center=(0, 0, 0), radius=1.0)
plane = pyraysum.Plane(normal=(0, 1, 0), distance=0)
scene.add_object(sphere)
scene.add_object(plane)

# 设置相机
camera = pyraysum.Camera(position=(5, 5, 5), look_at=(0, 0, 0))

# 创建渲染器并配置参数
renderer = pyraysum.Renderer(scene, camera)
renderer.set_resolution(800, 600)
renderer.set_samples_per_pixel(10)

# 渲染图像并保存
image = renderer.render()
image.save("output.png")